package com.maoshi.shop.seckill.comment.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.maoshi.shop.common.serializer.json.ImgJsonSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 秒杀商品信息简单版，用于分页
 * @author LGH
 */
@Data
public class SeckillProductSimpleDto {

    @ApiModelProperty(value = "商品ID", required = true)
    private Long prodId;

    @ApiModelProperty(value = "商品名称")
    private String prodName;

    @JsonSerialize(using = ImgJsonSerializer.class)
    @ApiModelProperty(value = "商品主图", required = true)
    private String pic;

    @ApiModelProperty(value = "秒杀活动id", required = true)
    private Long seckillId;

    @ApiModelProperty(value = "活动名称", required = true)
    private String seckillName;

    @ApiModelProperty(value = "开始时间", required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "结束时间", required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "秒杀活动剩余总库存", required = true)
    private Integer seckillTotalStocks;

    @ApiModelProperty(value = "秒杀活动原始库存", required = true)
    private Integer seckillOriginStocks;

    @ApiModelProperty(value = "商品价格", required = true)
    private Double price;

    @ApiModelProperty(value = "秒杀活动最低价", required = true)
    private Double seckillPrice;
}
